<%@page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
<%@page import="net.tanesha.recaptcha.ReCaptcha"%>
<%
String[] listError = (String[]) request.getAttribute("listError");
String success = (String) request.getAttribute("success");
String info = (String) request.getAttribute("info");
%>

<jsp:include page="layout/header.jsp">
	<jsp:param name="title" value="" />
	<jsp:param name="description" value="" />
	<jsp:param name="keywords" value="" />
	<jsp:param name="page" value="home" />
</jsp:include>

<div id="userform" class="clearafter">
	<div class="signupform">
		<%=success!=null?"<p style='color:blue'>"+success+"</p>":"" %>
		<b>1 : "If you wish to become a member and use to create our Auto Blog, you can register here." </b>
		<br/><br/>
		<form method="post" action="/register" name="signupform">
			<p>
				<%=listError[0]!=null?"<span style=\"color: red\">"+listError[0]+"</span><br/>":"" %>
				<label> Username 
				
				<br /> <input class="input" type="text"
					name="username" /> </label>
			</p>
			<p>
				<%=listError[1]!=null?"<span style=\"color: red\">"+listError[1]+"</span><br/>":"" %>
				<label> Password 
				
				<br /> <input class="input"
					type="password" name="password" /> </label>
			</p>
			<p>
				Wordpress <input class="input type" type="radio"
					name="type"  style="width: auto;"  value="wordpress" <%=(request.getAttribute("type")!=null&&request.getAttribute("type").equals("wordpress"))?"checked=\"checked\"":""%> <%=request.getAttribute("type")==null?"checked=\"checked\"":"" %>/>&nbsp;&nbsp;&nbsp;&nbsp;
				Blogger <input class="input type" type="radio"
					name="type"  style="width: auto;" value="blogger" <%=(request.getAttribute("type")!=null&&request.getAttribute("type").equals("blogger"))?"checked=\"checked\"":""%>/>
				&nbsp;<img alt="Question" src="/images/i-help.gif" class="question"/>
				<span class="note">
					Choose BlogSpot if your autoblog is BlogSpot and Choose Wordpress if Your AutoBlog is Wordpress.
				</span>	
			</p>
			<div id='load-field'>
				
			</div>
			<%=listError[5]!=null?"<span style=\"color: red\">"+listError[5]+"</span><br/>":"" %>
			<label>Image Verification</label>
			<script>
	        	var RecaptchaOptions = { theme : 'clean' };
	  		</script>
			<%
				//6LdXmcISAAAAAHz6FsABghup-EayldUCiKQyDPAk //public
				//6LdXmcISAAAAANPIv5ykGg3LAlBMnUQHzy3-Kiqo //private
	          ReCaptcha c = ReCaptchaFactory.newReCaptcha("6LcF-80SAAAAACucExTAmD8RBzETYxDZ35DkbMVF", "6LcF-80SAAAAAM2kArjyUwtVJYbH_DKredY3Q26U", false);
	          out.print(c.createRecaptchaHtml(null, null));
	        %>
	        <br/>
			<p>
				<input type="submit" value="Sign Up" />
			</p>
		</form>
	</div>
	<div id='wordpress' style="display: none;">
		<p>
			<%=listError[2]!=null?"<span style=\"color: red\">"+listError[2]+"</span><br/>":"" %>
			<label> Blog Url 
			
			<br /> <input class="input" type="text"
				name="domain" /> </label>
		</p>
		<p>
			<%=listError[3]!=null?"<span style=\"color: red\">"+listError[3]+"</span><br/>":"" %>
			<label> Your Username of Wordpress
			&nbsp;<img alt="Question" src="/images/i-help.gif" class="question"/>
			<span class="note">
				Input your username that you registed at Wordpress.
			</span>
			<br /> <input class="input"
				type="text" name="usernamepostdomain" /> </label>
		</p>
		<p>
			<%=listError[4]!=null?"<span style=\"color: red\">"+listError[4]+"</span><br/>":"" %>
			<label> Your Password of Wordpress 
			&nbsp;<img alt="Question" src="/images/i-help.gif" class="question"/>
			<span class="note">
				Input your password that you registed at Wordpress.
			</span>
			<br /> <input class="input"
				type="password" name="passwordpostdomain" /> </label>
		</p>
	</div>
	<div id='blogger' style="display: none;">
		<p>
			<%=listError[4]!=null?"<span style=\"color: red\">"+listError[4]+"</span><br/>":"" %>
			<label> BlogSpot ID 
			&nbsp;<img alt="Question" src="/images/i-help.gif" class="question"/>
			<span class="note">
				Input BlogSpotId at your BlogSpot
			</span>
			<br /> <input class="input"
				type="text" name="blogid" /> </label>
		</p>
		<p>
			<%=listError[3]!=null?"<span style=\"color: red\">"+listError[3]+"</span><br/>":"" %>
			<label> Email 
			&nbsp;<img alt="Question" src="/images/i-help.gif" class="question"/>
			<span class="note">
				Input your username that you registed at BlogSpot.
			</span>
			<br /> <input class="input"
				type="text" name="email" /> </label>
		</p>
		<p>
			<%=listError[4]!=null?"<span style=\"color: red\">"+listError[4]+"</span><br/>":"" %>
			<label> Password 
			&nbsp;<img alt="Question" src="/images/i-help.gif" class="question"/>
			<span class="note">
				Input your password that you registed at BlogSpot.
			</span>
			<br /> <input class="input"
				type="password" name="passwordemail" /> </label>
		</p>
	</div>
	<div class="loginform">
		<b>2 : "ALREADY HAVE AN ACCOUNT? If you already have an account with us, please use the login panel below to access your account."</b>
		<br/><br/>
		<%=info!=null?"<p style='color:red'>"+info+"</p>":"" %>
		<form method="post" action="/login" name="loginform">
			<p>
				<label> Username <br /> <input class="input" type="text"
					name="username" /> </label>
			</p>
			<p>
				<label> Password <br /> <input class="input"
					type="password" name="password" /> </label>
			</p>
			<p class="forgetmenot">
				<label> <input type="checkbox" value="forever"
					id="rememberme" name="rememberme" /> Remember Me </label>
			</p>
			<p class="loginsubmit">
				<input type="submit" value="Login" />
			</p>
			<div class="clearbreak" ></div>
			<a href="#" style="display: none;">Lost your password?</a>
		</form>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$("#load-field").html($("#wordpress").html());
		$(".type").click(function(){
			if($(this).val()=="wordpress")
			{
				$("#load-field").html($("#wordpress").html());		
			}
			if($(this).val()=="blogger")
			{
				$("#load-field").html($("#blogger").html());		
			}
			$(".question").click(
					function (e) {
						$(".note").attr("title","Click to close");
						$(this).parent().find(".note").css("display","block");
						$(this).parent().find(".note").css("left",e.pageX+20+"px");
						$(this).parent().find(".note").css("top",e.pageY-20+"px");
					}
			);
			$(".note").click(function(){
				$(this).css("display","none");
			});
		});
	});
</script>
<script type="text/javascript" src="/js/addlink.js"></script>
<%@ include file='/layout/footer.jsp'%>